/**
 * 
 */
package ru.olympus.antonyhands.ao.client;

import java.util.List;

import ru.olympus.antonyhands.ao.client.widgets.TreeTable.TreeTableDataSource;
import ru.olympus.antonyhands.ao.shared.item.EItemParentType;
import ru.olympus.antonyhands.ao.shared.item.ItemDTO;
import ru.olympus.antonyhands.ao.shared.item.ItemMarketPriceDTO;
import ru.olympus.antonyhands.ao.shared.item.EItemsViewType;
import ru.olympus.antonyhands.ao.shared.util.StringPair;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Сервис для добавления/сохранения данных
 * 
 * @author AntonyHands
 * @since 14.02.2012
 */
public interface AOHelperServiceAsync
{
    public static final String ITEM_CATEGORY = "ITEM_CATEGORY";
    public static final String CRAFT_SKILL = "CRAFT_SKILL";

    void addItemBase(String itemType, String code, String title, AsyncCallback<String> callback);

    void saveData(AsyncCallback<String> callback);

    void listItemCategories(AsyncCallback<List<StringPair>> callback);

    void listCraftSkills(AsyncCallback<List<StringPair>> callback);

    void listItems(EItemParentType parentType, String parentCode,
			EItemsViewType sortingType,
			AsyncCallback<List<StringPair>> callback);

    void addItem(String code, String title, String categoryCode, String fixedPrice, String craftSkillCode, String craftLevel, String workload, String craftQuantity, List<StringPair> resources, AsyncCallback<String> callback);

    void getItemDTO(String itemCode, AsyncCallback<ItemDTO> callback);

	void saveMarketPrice(String itemCode, String marketPrice,
			AsyncCallback<String> callback);

	void listMarketPricesHierarchyList(String itemCode,
			AsyncCallback<List<ItemMarketPriceDTO>> callback);

	void updateItemsMarketPrices(List<StringPair> itemPrices,
			AsyncCallback<String> callback);

	void getItemCraftDS(String itemCode,
			AsyncCallback<TreeTableDataSource> callback);
}
